package com.vito.dcs.water.device.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.vito.base.factory.IDFactory;
import com.vito.dcs.water.device.dao.WaterPoreMapper;
import com.vito.dcs.water.device.model.WaterPoreModel;
import com.vito.dcs.water.device.service.WaterPoreService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @program: WaterPoreServiceImpl
 * @description: 水稳搅拌机设备设置筛孔表服务接口实现类
 * @author: rongr
 * @create: 2019/04/10
 */
@Service
public class WaterPoreServiceImpl implements WaterPoreService {

    @Autowired
    private WaterPoreMapper waterPoreMapper;

    @Override
    public Integer saveWaterPore(WaterPoreModel waterPoreModel) {
        String waterPoreId = IDFactory.getIDFactory().getIdInc("tbl_dcs_min_water_pore") + "";
        waterPoreModel.setWaterPoreId(waterPoreId);
        //return waterPoreMapper.saveWaterPore(waterPoreModel);
        return null;
    }

    @Override
    public Integer updateWaterPore(Map<String, Object> map) {
        return waterPoreMapper.updateWaterPore(map);
    }

    @Override
    public WaterPoreModel queryWaterPoreById(WaterPoreModel waterPoreModel) {
        return waterPoreMapper.queryWaterPoreById(waterPoreModel);
    }

    @Override
    public List<WaterPoreModel> queryWaterPoreByBlenderId(Map<String, Object> map) {
        List<WaterPoreModel> waterPoreModels = waterPoreMapper.queryWaterPoreByBlenderId(map);
        return waterPoreModels;
    }
}

